﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CubicFWNet.Data.Models.Mapping
{
    public class TechTypeMap : EntityTypeConfiguration<TechType>
    {
        public TechTypeMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.TechTypeName)
                .IsRequired()
                .HasMaxLength(64);

            // Table & Column Mappings
            this.ToTable("TechType");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.EquipmentId).HasColumnName("EquipmentId");
            this.Property(t => t.TechTypeName).HasColumnName("TechTypeName");
            this.Property(t => t.WasteW).HasColumnName("WasteW");
            this.Property(t => t.MinuteNum).HasColumnName("MinuteNum");
            this.Property(t => t.TechTypeId).HasColumnName("TechTypeId");
            this.Property(t => t.ExamineNum).HasColumnName("ExamineNum");
        }
    }
}
